<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../../dist/vue.js"></script>
  </head>
  <body>
    <div id="app">
      {{data}} {{data2}} {{data2.data3}}
      <anchored-heading :level="1">
        <span>哈哈</span>
      </anchored-heading>
    </div>
    <script>
      debugger;
      Vue.component("anchored-heading", {
        render: function (createElement) {
          return createElement("h" + this.level, this.$slots.default);
        },
        props: {
          level: {
            type: Number,
            required: true,
          },
        },
      });

      debugger;
      let vm = new Vue({
        test: "123",
        el: "#app",
        data: () => {
          return {
            data: "11",
            data2: {
              data3: "333",
            },
          };
        },
      });
      console.log(vm);
    </script>
  </body>
</html>
